package emarket;

public class Trader {

	private String _identifier;

	
	public Trader( String name )
	{
		this._identifier = name;
	}
	
	public void set_identifier(String _identifier) {
		this._identifier = _identifier;
	}

	public String get_identifier() {
		return _identifier;
	}
	
	
	
	
	public boolean equals(Object o )
	{
		
		if(!(o instanceof Trader))
		{
			throw new ClassCastException("Invalid object");
		}
		
		Trader other = (Trader) o;
		
		if( this == other )
			return true;
		
		if( other.get_identifier().equals( this._identifier ) )
			return true;
		
		return false;
	}
	
	public String toString()
	{
		return _identifier;
	}
}
